home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 1
/
Nebula One.iso
/
Utilities
/
Printer
/
djf_for_3.0
/
Makefile
< prev
next >
Wrap
Makefile
|
1996-04-30
|
4KB
|
132 lines
CC=cc
# CFLAGS:
# - DEBUG prints some comments on stderr, usually /usr/adm/lpd-errs
# - USE_1 Additionally try the compression mode 1. There is
# rarely any case where this mode is better than mode 2.
#
CFLAGS= -arch m68k -arch i386 -arch hppa -arch sparc -g -O -Wall
# BINDIR Where the filter will be installed
BINDIR=/usr/local/lib
# PPDDIR Where the PPD files reside
#PPDDIR=/usr/lib/NextPrinter/pdf for 2.1
PPDDIR=/NextLibrary/PrinterTypes
# PPDFILE Name of Printer Description File
#PPDFILE=HP_Deskjet_500.pdf for 2.1
PPDFILE=HP_Deskjet_500.ppd
# MANDIR Where man pages will be installed
MANDIR=/usr/local/man
#
# Change the following before issuing the "make install" rule
# TTY Which serial port DeskJet is attached to
TTY=ttyfb
# SPEED Baud rate for serial line. 030 systems change this to 9600
SPEED=19200
# PRT Name of printer as you want it called
PRT=dj
all:
@echo "There is no default target in this Makefile !"
@echo
@echo "You have two major choices:"
@echo " choose between Deskjet(+) and Deskjet500 and Deskjet 500C/550C"
@echo " choose the default papersize (DIN-A4 versus US-letter-format)"
@echo
@echo "So, please enter one of the following four commands"
@echo
@echo " make USdj for Deskjet(+) and US-letter"
@echo " make EUROdj for Deskjet(+) and DIN-A4"
@echo " make USdj500 for Deskjet500 and US-letter"
@echo " make EUROdj500 for Deskjet500 and DIN-A4"
@echo " make USdj500C for Deskjet500C/550C and US-letter"
@echo " make EUROdj500C for Deskjet500C/550C and DIN-A4"
@echo
@echo "This will make the choosen driver ...."
@echo
@echo "Don't forget to check the selected printerport and the"
@echo "baudrate. Both are predefined to 'ttyfb' and '19200' respectivly."
@echo "To change these values edit the defines 'TTY' and 'SPEED'"
@echo "in the makefile."
@echo
@echo "Afterwards just become root and enter 'make install' to finally install your"
@echo "new driver."
USdj:
make CFLAGS="$(CFLAGS) -DUSE_2 -DLETTER" djf
EUROdj:
make CFLAGS="$(CFLAGS) -DUSE_2 -DA4" djf
USdj500:
make CFLAGS="$(CFLAGS) -DUSE_2 -DUSE_3 -DLETTER" djf
EUROdj500:
make CFLAGS="$(CFLAGS) -DUSE_2 -DUSE_3 -DA4" djf
USdj500C:
make CFLAGS="$(CFLAGS) -DUSE_2 -DUSE_3 -DUSE_9 -DLETTER" djf
EUROdj500C:
make CFLAGS="$(CFLAGS) -DUSE_2 -DUSE_3 -DUSE_9 -DA4" djf
#########################################################
# Base rules for making djf
#########################################################
.psw.o:
-rm -f $*.c
$(PSWRAP) $(PSWFLAGS) -a -o $*.c $*.psw
$(CC) $(CFLAGS) -c $*.c
-rm -f $*.c
djf: djf.o djwraps.o printpage.o
$(CC) $(CFLAGS) -o djf djf.o djwraps.o printpage.o -lNeXT_s
djwraps.o: djwraps.psw
clean:
rm -f core *.o djf binfile djwraps.c
#########################################################
# Rules for installing deskjet filter and creating the new printer
#########################################################
install: djf
make installit
installit:
sed -n -e "s/BBBB/$(SPEED)/g" -e "s/PRT/$(PRT)/g" -e "s/TTY/$(TTY)/g" -e 'w /tmp/printcap' < djf.printcap
-[ -d $(BINDIR) ] || mkdir $(BINDIR)
-[ -d $(MANDIR) ] || mkdir $(MANDIR)
-[ -d $(MANDIR)/man8 ] || mkdir $(MANDIR)/man8
-[ -d /usr/spool/NeXT/$(PRT) ] || (mkdir /usr/spool/NeXT/$(PRT); chown agent.daemon /usr/spool/NeXT/$(PRT); chmod 770 /usr/spool/NeXT/$(PRT))
@echo "Spool directory created..."
rm -f $(BINDIR)/djf
rm -f $(MANDIR)/man8/djf.8
rm -f $(BINDIR)/djint.sh
rm -f $(BINDIR)/djdf
rm -f $(BINDIR)/djif
rm -f $(BINDIR)/djgf
rm -f $(BINDIR)/djnf
rm -f $(BINDIR)/djtf
rm -f $(BINDIR)/djrf
rm -f $(BINDIR)/djvf
rm -f $(BINDIR)/djcf
rm -f $(BINDIR)/djof
cp -p djf.8 $(MANDIR)/man8
cp $(PPDFILE) $(PPDDIR)
-strip djf
cp -p djf $(BINDIR)
cp djint.sh $(BINDIR)
ln $(BINDIR)/djint.sh $(BINDIR)/djdf
ln $(BINDIR)/djint.sh $(BINDIR)/djif
ln $(BINDIR)/djint.sh $(BINDIR)/djgf
ln $(BINDIR)/djint.sh $(BINDIR)/djnf
ln $(BINDIR)/djint.sh $(BINDIR)/djtf
ln $(BINDIR)/djint.sh $(BINDIR)/djrf
ln $(BINDIR)/djint.sh $(BINDIR)/djvf
ln $(BINDIR)/djint.sh $(BINDIR)/djcf
ln $(BINDIR)/djint.sh $(BINDIR)/djof
@echo "Filter installed in $(BINDIR) ..."
niload -v printcap . < /tmp/printcap
@echo "Printers defined to system. You may see these by 'nidump printcap .'"